package com.sanley.piss.model.po;


import com.sanley.piss.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 用户表
 *
 * @author limk
 * @date 2021/1/26 8:30
 */
@EqualsAndHashCode
@Data
@ApiModel(value = "后台操作数据",description = "后台操作数据参数说明")
public class User extends BaseEntity implements Serializable {

    private static final long serialVersionUID = -1182133380640800672L;

    @ApiModelProperty(value = "账号,{账号不允许修改}")
    @NotBlank(message = "账号不能为空")
    private String username;

    @ApiModelProperty(value = "密码")
    @Size(max = 12,min = 6,message = "密码长度：6-12")
    @NotBlank(message = "密码不能为空")
    private String password;

    @ApiModelProperty(value = "盐值",hidden = true)
    private String salt;

    @ApiModelProperty(value = "部门ID",hidden = true)
    private Integer deptId;

    @ApiModelProperty(value = "状态   0：正常  1：锁定  2：禁用",hidden = true)
    private Byte state;


}